package com.ty.xiaoyu.service;

import com.ty.xiaoyu.entity.Reply;
import com.ty.xiaoyu.exception.ReplyOperationException;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ReplyService {

    // 根据主贴id获取回帖
    List<Reply> getReplyListByTopicId(String topicId) throws ReplyOperationException;

    // 新增回帖
    Reply addReply(Reply reply) throws ReplyOperationException;

    // 根据id获取回帖
    Reply getReplyById(@Param("replyId") String replyId) throws ReplyOperationException;

    // 根据topicId获取reply数量
    Integer getReplyNum(@Param("topicId") String topicId);
}
